package com.qf.flash.ui.chat;

import android.view.View;
import android.widget.ImageView;

import com.qf.flash.R;
import com.qf.flashlib.adapter.BaseRViewItem;
import com.qf.flashlib.adapter.RViewHolder;

public class GroupModifyBottomItem extends BaseRViewItem {
    private boolean isChoosed =true;
    @Override
    public int getItemLayout() {
        return R.layout.item_group_modify;
    }

    @Override
    public void convert(RViewHolder holder, Object entity, int position, int itemSize) {
        ImageView imageView = holder.getView(R.id.iv_chosen);
        imageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if(isChoosed){
                    imageView.setImageResource(R.mipmap.icon_check);
                    isChoosed=!isChoosed;
                }else {
                    imageView.setImageResource(R.mipmap.icon_uncheck);
                    isChoosed=!isChoosed;
                }

            }
        });
    }
}
